package com.wms.service;

import com.wms.bean.PageBean;
import com.wms.entity.Purchase;
import com.wms.entity.PurchaseDetail;
import com.wms.entity.PurchaseGoods;

import java.util.List;

public interface PurchaseService {

    /**
     * 获取列表信息
     * @return
     */
    List<Purchase> getAll();

    /**
     * 根据不同条件查询
     * @param condition
     * @return
     */
    List<Purchase> queryByCondition(Purchase condition);

    /**
     * 分页查询
     * @param page
     * @param pageSize
     * @return
     */
    PageBean queryByPage(int page, int pageSize);

    /**
     * 根据id查找采购明细
     * @param id
     * @return
     */
    List<PurchaseDetail> queryPurchaseDetail(int id);

    /**
     * 根据采购单号查询采购商品明细
     * @param purchaseCode
     * @return
     */
    List<PurchaseGoods> queryPurchaseGoods(String purchaseCode);

    /**
     * 保存采购单
     * @param purchase
     * @return
     */
    int savePurchase(Purchase purchase);

}
